<!--
 * @Author: your name
 * @Date: 2022-01-18 13:26:07
 * @LastEditTime: 2022-01-18 14:06:08
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \star-cat-h5\src\views\artist\components\ipbottomview.vue
-->
<template>
  <div id="iphone-bottom-view">
    <slot></slot>
  </div>
</template>

<script>
export default {
  mounted() {
    this.setIphone();
  },
  methods: {
    setIphone() {
      if (
        window.screen.availHeight >= 812 &&
        /iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())
      ) {
        let IphoneBottomview = document.getElementById("iphone-bottom-view");
        let nodechilds =  IphoneBottomview.childNodes
        nodechilds[nodechilds.length-1].style.paddingBottom = 34 + "px"
        IphoneBottomview.style.height = nodechilds[nodechilds.length-1].clientHeight + 'px';
      }
    },
  },
};
</script>